package com.hp.test.java8.steam;

import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author 01412764
 * @description
 * @create 2021-07-15 09:52
 * @copyright (C), 2015-2021, 顺丰科技有限公司
 * @since 1.0.0
 */
public class MergeList {

	public static void main(String[] args) throws InterruptedException, ExecutionException {
		List<Integer> listA = Arrays.asList(1, 2);
		List<Integer> listB = Arrays.asList(3, 4);
		List<Integer> res = Stream.of(listA, listB).flatMap(Collection::stream).collect(Collectors.toList());

		res.forEach(System.out::println);
	}

}
